<?php include TMPL_PATH.'public/header.phtml';?>
<style>
.col-2 .content{line-height:22px;}
</style>
<div id="main_frameid" class="pad-10" style="_margin-right:-12px;_width:98.9%;">
<script type="text/javascript">
$(function(){if ($.browser.msie && parseInt($.browser.version) < 7) $('#browserVersionAlert').show();}); 
</script>
<div class="explain-col mb10" style="display:none" id="browserVersionAlert">
使用IE8浏览器可获得最佳视觉效果</div>
<div class="col-2 lf mr10" style="width:48%">
	<h6>我的个人信息</h6>
	<div class="content">
	您好，<?php echo $_SESSION['admin_user_info']['user_name']?><br />
	所属角色：<?php echo $_SESSION['admin_user_info']['role_name'];?> <br />
	<div class="bk20 hr"><hr /></div>
	上次登录时间：<?php echo date('Y-m-d H:i:s', $user['lastlogintime']);?><br />
	上次登录IP：<?php echo $user['lastloginip'];?> <br />
	</div>
</div>
<?php if($_SESSION['admin_user_info']['roleid']==1):?>
<div class="col-2 col-auto">
	<h6>系统信息</h6>
	<div class="content">
	程序版本：Cjli Shop V2.0<br />
	操作系统：<?php echo PHP_OS;?> <br />
	Web 服务器：<?php echo $_SERVER['SERVER_SOFTWARE'];?> <br />
	PHP 版本：<?php echo PHP_VERSION;?> <br />
	MySQL 版本：<?php echo mysql_get_server_info();?><br />
	安全模式：<?php echo (boolean) ini_get('safe_mode') ? '是':'否';?> <br />
	Zlib 支持：<?php echo function_exists('gzclose') ? '是':'否';?> <br />
	Socket 支持：	<?php echo function_exists('fsockopen') ? '是':'否';?> <br />
	上传文件：<?php echo @ini_get('file_uploads') ? ini_get('upload_max_filesize') :'unknown';?><br />	
	</div>
</div>
<div class="bk10"></div>
<div class="col-2 lf mr10" style="width:48%">
	<h6>订单统计信息</h6>
		<div class="content">
			<table width="100%" border="0">
				<tr>
					<td width="20%">待发货订单:</td>
					<td width="30%"><?php echo $orderStatistics['unshipping_count'];?></td>
					<td width="20%">未确认订单:</td>
					<td width="30%"><?php echo $orderStatistics['unconfirm_count'];?></td>
				</tr>
				<tr>
					<td>待支付订单:</td>
					<td><?php echo $orderStatistics['unpay_count'];?></td>
					<td>已成交订单数:</td>
					<td><?php echo $orderStatistics['comlite_count'];?></td>
				</tr>
				<tr>
					<td>部分发货订单:</td>
					<td><?php echo $orderStatistics['part_shipping_count'];?></td>
					<td></td>
					<td></td>
				</tr>
			</table>
		</div>
</div>
<div class="col-2 col-auto">
	<h6>商品统计信息</h6>
	<div class="content">
		<table width="100%" border="0">
			<tr>
				<td width="25%">商品总数:</td>
				<td width="25%"><?php echo $productStatistics['product_count'];?></td>
				<td width="20%">库存警告商品数:</td>
				<td width="30%"><?php echo $productStatistics['warming_count'];?></td>
			</tr>
			<?php 
				$k = 0;
				if(isset($productStatistics['topCategoryList']) && $productStatistics['topCategoryList']):
					foreach ($productStatistics['topCategoryList'] as $cat):
					$k++;
					if($k%2 ==1)
						echo '<tr>';
		  ?>
		  	<td><?php echo $cat['name'];?>商品数:</td>
				<td><?php echo $cat['count'];?></td>
		  <?php 
					if($k%2==0)
						echo '</tr>';
					endforeach;
				endif;
			?>
		</table>
	</div>
</div>
<?php endif;?>
<!--  
<div class="bk10"></div>
<div class="col-2 lf mr10" style="width:48%">
	<h6>快捷方式</h6>
		<div class="content" id="admin_panel">
	<?php if(isset($adminpanel) && $adminpanel){
					foreach($adminpanel as $v) {
	?>
		<span>
			[<a target="right" href="<?php echo U($v['url'], 'menuid='.$v['menuid']);?>"><?php echo $v['name']?></a>]   
		</span>
	<?php }}?>
		</div>
</div>
-->
    <div class="bk10"></div>
</div>
</body></html>